1. Field of the Invention
The present invention relates to an information processing device, particularly an information processing device comprising memories to write information data into and a semiconductor device in which the information processing device is formed.
2. Description of the Related Art
As wattmeters to measure the usage amount of power used in facilities receiving power supply from an electric power company, there have been known smart meters, which comprise a communication function to notify the measured power usage amount to the power supply company. In the smart meter, a CPU (Central Processing Part) and a program memory storing a program are incorporated to perform this communication through microcomputer control. As the program memory, a non-volatile memory such as a flash memory is used to allow for version upgrade of program data. However, if a power failure or the like occurs while new program data is being written into the memory in the program version-upgrade process, then the program data written is destroyed with the possibility that the smart meter may become unable to operate.
Accordingly, a program rewriting method has been proposed wherein the same program data is stored in two memory areas in the memory, wherein at version upgrade, new program data is over-written into one memory area, and wherein when the new program data is verified to be correctly written, this program data is copied into the other memory area (refer to, e.g., Japanese Patent Publication No. 2002-63044). According to this program rewriting method, even if the new program data over-written into the one memory area is destroyed because of a power failure or the like at version upgrade, by executing the old program data stored in the other memory area, the state of being unable to operate can be avoided.
In this program rewriting method, determination of whether program data has been correctly written is performed through error detection using a checksum, and hence the reliability of the determination is low.
Accordingly, it is conceivable that at the time of writing in the initial version of program data before product shipment, which requires high reliability, so-called verification will be performed where after writing the same program data into each memory area, program data is read out from each memory area, and where it is determined whether the read-out program data is the same as the above write program data.
However, there is the problem that if this verification is performed sequentially for the two memory areas, a very long time will be spent.